{template '_header'}
<div class='fui-page fui-page-current store-selector-page' id="page-store-selector">
 
	<div class="fui-header">
	    <div class="fui-header-left">
		<a class="back"></a>
	    </div>
	    <div class="title">选择门店</div> 
	    <div class="fui-header-right">
			<a href="javascript:;" id="btn-near"><i class="icon icon-location"></i> 离我最近</a>
		</div>
	</div>
	<div class='fui-content'>
	      <div class="fui-searchbar">
		<div class="searchbar">
		       <a class="searchbar-cancel">取消</a>
		      <div class="search-input">
		        <i class="fa fa-search"></i>
		        <input type="search" placeholder="输入门店关键字..." id="search">
		      </div>
		</div>
	    </div>
	    <div class='content-empty' {if !empty($list)}style='display:none'{/if}>
			<i class='icon icon-store'></i>
			<br/>没有任何门店
	     </div>
	    <div class="fui-list-group" >
		
		{loop $list $store}
		<div  class="fui-list store-item" 
		      data-storeid="{$store['id']}"
		      data-lng="{php echo floatval($store['lng'])}"
		      data-lat="{php echo floatval($store['lat'])}">
		    <div class="fui-list-media">
			<i class='icon icon-shop'></i>
		    </div>
		    <div class="fui-list-inner">
			<div class="title"> <span class='storename'>{$store['storename']}</span></div>
			<div class="text">
			    <span class='realname'>{$store['realname']}</span> <span class='mobile'>{$store['mobile']}</span>
			</div>
			<div class="text">
			    <span class='address'>{$store['address']}</span>
			</div>
			<div class="text location" style="color:green;display:none">正在计算距离...</div>
		    </div> 
		     <div class="fui-list-angle">
			 {if !empty($store['tel'])}<a href="tel:{$store['tel']}" class='external '><i class=' icon icon-phone' style='color:green'></i></a>{/if}
			 <a href="{php echo mobileUrl('store/map',array('id'=>$store['id'],'merchid'=>$store['merchid']))}" class='external' ><i class='icon icon-location' style='color:#f90'></i></a>
  		      </div>
		</div> 
		{/loop}
	    </div> 
	</div>
    <script language='javascript'>
	    require(['biz/store/selector'], function (modal) {
		modal.init()
                });</script>
</div>

{template '_footer'}